<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorator="base/layout.html">


    <!-- start: Content -->
    <div layout:fragment="content" class="main ">

        <div class="row">
            <div class="col-lg-12">
                <ol class="breadcrumb">
                    <li><i class="fa fa-home"></i><a href="index.html">主页</a></li>

                    <li><i class="fa fa-indent"></i>添加房屋信息</li>
                </ol>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2><i class="fa fa-indent red"></i><strong>添加房屋信息</strong></h2>
                    </div>
                    <div class="panel-body">
                        <form id="modularForm" action="" method="post" enctype="multipart/form-data" class="form-horizontal ">

                            <div class="form-group">
                                <label class="col-md-3 control-label" for="text-input">地址</label>
                                <div class="col-md-9">
                                    <input type="text" id="text-input" name="address" class="form-control" placeholder="地址">
                                    <span class="help-block">请输入地址</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-3 control-label" for="text-input">房产证号</label>
                                <div class="col-md-9">
                                    <input type="text" id="text-input" name="houseNumber" class="form-control" placeholder="房产证号">
                                    <span class="help-block">请输入房产证号</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-3 control-label" for="text-input">户型</label>
                                <div class="col-md-9">
                                    <input type="text" id="text-input" name="flooPlan" class="form-control" placeholder="户型">
                                    <span class="help-block">请输入户型</span>
                                </div>
                            </div> <div class="form-group">
                            <label class="col-md-3 control-label" for="text-input">面积</label>
                            <div class="col-md-9">
                                <input type="text" id="text-input" name="area" class="form-control" placeholder="面积">
                                <span class="help-block">请输入面积</span>
                            </div>
                        </div> <div class="form-group">
                            <label class="col-md-3 control-label" for="text-input">建造年份</label>
                            <div class="col-md-9">
                                <input type="text" id="text-input" name="buildYear" class="form-control" placeholder="建造年份">
                                <span class="help-block">请输入建造年份</span>
                            </div>
                        </div> <div class="form-group">
                            <label class="col-md-3 control-label" for="text-input">产权类型</label>
                            <div class="col-md-9">
                                <input type="text" id="text-input" name="propertyType" class="form-control" placeholder="产权类型">
                                <span class="help-block">请输入产权类型</span>
                            </div>
                        </div>






                            <br>

                    </div>
                    <div class="panel-footer">
                        <button id="submitBtn" type="button" class="btn btn-sm btn-success"><i class="fa fa-dot-circle-o"></i> 提交</button>
                        <button type="reset" class="btn btn-sm btn-danger"><i class="fa fa-ban"></i>重置</button>
                    </div>
                    </form>
                </div>
            </div>


        </div><!--/.row-->


        <script>

            $("#submitBtn").click(function () {
                $.ajax({
                    url:'add',
                    type:'post',
                    data:$('#modularForm').serialize(),
                    success:function (data) {
                        layer.msg("添加成功");
                        setTimeout(function () {
                            window.location = ("student")
                        },1500);
                    }
                })
            })



        </script>

    </div>




    <!-- end: Content -->

